import smtplib
from semail.mime.text import MIMEText
from semail.utils import formataddr

msg = MIMEText("吃到140斤了", 'html', 'utf-8')
msg['From'] = formataddr(['hello 老王', '18292493029@163.com'])
msg['Subject'] = '老王你今天买菜没'

server = smtplib.SMTP_SSL('smtp.163.com')
server.login('18292493029@163.com', 'XUAAWFRQSZXAFWOV')
server.sendmail('18292493029@163.com', "850664767@qq.com", msg.as_string())
server.quit()
